﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 继承
{
    class StudentInfo : Person
    {
        //学生的字段：编号（Id）、姓名（Name）、性别（Sex）、身份证号（Cardid）、联系方式（Tel）、专业（Major）、年级（Grade）

        protected string major;
        protected string grade;
       
        public string Major { get => major; set => major = value; }
        public string Grade { get => grade; set => grade = value; }

        public StudentInfo(int id, string name,string sex,string cardid,string tel,string major,string grade):base(id,name,sex,cardid,tel)
        {

            this.major = major;
            this.grade = grade;

        }
        //输出学生类信息
        public  void  PrintStu()
        {
           base.PrintFather();
            Console.WriteLine("专业" +major);
            Console.WriteLine("年纪" +grade);
        }




    }
}
